home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
DATATYPE
/
LINKINIT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-08-18
|
2KB
|
45 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; initialization of a linked list
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBINI, EFLIBDAT;
var LinkedList : LinkedListObjectType;
SomeData : string;
begin
with LinkedList do begin
{ Initialize list without sorting, with front access and
restriction in the access (overflow checking enabled) }
InitializeList (SizeOf(SomeData), UnsortedOrder,
{ Element size } { Sort order }
FALSE, FALSE);
{ Access behind } { Unrestricted access }
{ Add some elements to the linked list. Notice that the elements
are added in the lists front (AccessFromBehind is disabled). }
SomeData := 'Something...';
Add (SomeData); Add (SomeData); Add (SomeData);
SomeData := SomeData + 'else';
Add (SomeData); Add (SomeData); Add (SomeData);
SomeData := SomeData + ' to';
Add (SomeData); Add (SomeData); Add (SomeData);
SomeData := SomeData + ' work with?';
Add (SomeData); Add (SomeData); Add (SomeData);
SomeData := SomeData + ' EFLIB!';
Add (SomeData); Add (SomeData); Add (SomeData);
{ Test the list }
SomeData := 'This is just some garbage information';
Element (1, SomeData); WriteLn (SomeData);
Intercept;
end;
if GlobalDataError then WriteLn ('Error(s) reported!');
end.